// 聊天消息模型
class ChatMessage {
  final String id;
  final String senderId;
  final String content;
  final DateTime timestamp;
  final bool isMe; // 是否是自己发送的消息

  ChatMessage({
    required this.id,
    required this.senderId,
    required this.content,
    required this.timestamp,
    required this.isMe,
  });
}

// 聊天列表项模型
class ChatListItem {
  final String id;
  final String name; // 聊天对象名称
  final String avatar; // 头像
  final String lastMessage; // 最后一条消息
  final DateTime lastMessageTime; // 最后消息时间
  final int unreadCount; // 未读消息数
  final bool isOnline; // 是否在线

  ChatListItem({
    required this.id,
    required this.name,
    required this.avatar,
    required this.lastMessage,
    required this.lastMessageTime,
    this.unreadCount = 0,
    this.isOnline = false,
  });
}
